﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BesAsm.Emgaats.Core
{
  public partial class TestParametersDialog : Form
  {
    public TestParametersDialog()
    {
      InitializeComponent();

      InitValues();
    }

    private void InitValues()
    {
      txtConnectionString.Text = Properties.Settings.Default.UserConnectionString;
      txtMasterDataSource.Text = Properties.Settings.Default.ArcCatalogConnectionFileName;
      txtPathToLayerFiles.Text = Properties.Settings.Default.MasterLayersPath;
      txtDefaultWorkspace.Text = Properties.Settings.Default.DefaultWorkspace;
    }

    private void btnOK_Click(object sender, EventArgs e)
    {
      Properties.Settings.Default.UserConnectionString = txtConnectionString.Text;
      Properties.Settings.Default.ArcCatalogConnectionFileName = txtMasterDataSource.Text;
      Properties.Settings.Default.MasterLayersPath = txtPathToLayerFiles.Text;
      Properties.Settings.Default.DefaultWorkspace = txtDefaultWorkspace.Text;
      Properties.Settings.Default.Save();
    }
  }
}
